The morning betrayer

Riddle:

Every night I’m told what to do, every morning I do it, but you hit me anyway. What am I?

Answer:

Answer: An alarm clock. Explanation: You set it nightly, it rings as instructed, yet people often smack it in frustration.